package com.tiza.xiaoyoubao.ui.fragment;

import android.os.Bundle;
import android.widget.TextView;

import com.orhanobut.hawk.Hawk;
import com.tianze.library.base.BaseFragment;
import com.tiza.xiaoyoubao.R;
import com.tiza.xiaoyoubao.app.Constants;
import com.tiza.xiaoyoubao.entity.ReceivedComplainInfo;
import com.tiza.xiaoyoubao.entity.UserInfo;

import butterknife.BindView;

/**
 * Created by mapple on 17/4/26.
 */

public class ReceivedComplainDetailFragment extends BaseFragment {

    UserInfo userInfo = Hawk.get(Constants.KEY_USER_INFO, (UserInfo) null);
    @BindView(R.id.tv_orderId)
    TextView tv_orderId;
    @BindView(R.id.tv_state)
    TextView tv_state;
    @BindView(R.id.tv_qq)
    TextView tv_qq;
    private Bundle args;
    private ReceivedComplainInfo info;

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_received_compain_detial;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        args = getArguments();
        info = (ReceivedComplainInfo) args.getSerializable("info");
        if (null == info) {
            toast("详情加载失败");
            finish();
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        tv_orderId.setText(info.getSellerid());
        tv_state.setText(info.getAppealReason());
        tv_qq.setText(userInfo.getWebzzCmsBuyerInfo().getQqCard());

    }
}
